package top.someapp.applib;

import java.nio.charset.Charset;

/**
 * 常用的字符集编码(charset)
 *
 * @author zwz
 * Created on 2020-06-10
 */
public final class CommonCharsets {

    private CommonCharsets() {
        // no need instance.
    }

    /**
     * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the
     * Unicode character set
     */
    public static final Charset US_ASCII = Charset.forName("US-ASCII");

    /**
     * ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
     */
    public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");

    /**
     * Eight-bit UCS Transformation Format，类unix上使用的编码
     */
    public static final Charset UTF_8 = Charset.forName("UTF-8");

    /**
     * GBK编码，windows上使用的编码
     */
    public static final Charset GBK = Charset.forName("GBK");

}
